<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ include file="/parameter.jsp" %>
<html>
<head>
	<title>后台管理</title>
	<%@ include file="/admin/adminParam.jsp" %>
<script language="javascript">
     window.onload = function(){
      var oFCKeditor = new FCKeditor('fcksummary') ;
      oFCKeditor.BasePath = '${pageContext.request.contextPath}/FCKeditor/' ;
      oFCKeditor.ToolbarSet = 'Default' ;
      oFCKeditor.Width = '100%' ;
      oFCKeditor.Height = '300' ;
      oFCKeditor.ReplaceTextarea();
	 }

function toSubmit(){
	var sortname = document.sortForm.boardname.value;
	if(sortname != null && sortname != ""){
		return sortForm.submit();
	}else{
		alert("不能提交空的分类名！");
		document.sortForm.boardname.focus();
		return false;
	}
	var topboard = document.getElementById("supersetid").value;
	if("" == topboard){
		alert("上级分类不能是空！");
		return false;
	}else{
		return sortForm.submit();
	}
}
</script>
</HEAD>
<body onBlur="">
<div class="statusBar"></div>

		<table width="75%" align="center" border="0" cellspacing="5" cellpadding="0" class="table">
		<form name="sortForm" method="post" action="adminAction.do?method=BoardAddDo" onSubmit="return Validator.Validate(this, 3)">
		  <tr>
			<td align="right">上级分类：</td>
			<td><select name="supersetid" datatype="Require" msg="必须选择" >
					<option value="">请选择...</option>
                    <c:forEach items="${parentBoardList}" var="board">
					<option value="${board.id}">${board.boardname}</option>
                    </c:forEach>
				</select></td>
			<td align="left">顶级分类！如果不选择，则为顶级分类，默认设置为顶级分类！</td>
		  </tr>
		  <tr>
			<td align="right">本级分类名称：</td>
			<td><input type="text" class="input2" id="boardname" name="boardname" size="30" maxlength="50" value="" title="本级分类名称" datatype="Require" msg="必须填写" ></td>
			<td align="left">需要添加的分类！</td>
		  </tr>
		  <tr>
			<td align="right">是否在首页显示：</td>
			<td><select name="isdisplay" title="是否在首页显示" datatype="Require" msg="必须选择">
					<option value="0" selected>是</option>
					<option value="1">否</option>
				</select></td>
			<td align="left">默认为在首页显示！</td>
		  </tr>
		  <tr>
			<td align="right">分类关键字：</td>
			<td><input type="text" class="input2" id="postkey" name="postkey" size="30" maxlength="50" value="" title="分类关键字"></td>
			<td align="left">添加的分类关键字，没个关键字用逗号分开！</td>
		  </tr>
		  <tr>
			<td align="right">分类序号：</td>
			<td><input type="text" class="input2" id="orderby" name="orderby" size="30" maxlength="50" value="99" title="分类序号"></td>
			<td align="left">添加的分类的排序号，默认为99！</td>
		  </tr>
		  <tr>
			<td align="right">设置版主：</td>
			<td><select name="masterid" title="设置版主">
					<option value="0" selected>请选择...</option>
                    <c:forEach items="${user}" var="user">
					<option value="${user.id}">${user.username}</option>
                    </c:forEach>
				</select></td>
			<td align="left"></td>
		  </tr>
		  <tr>
			<td align="right">板块描述：</td>
			<td><textarea id="fcksummary" name="summary"></textarea></td>
			<td align="left"></td>
		  </tr>
		  <tr>
			<td>&nbsp;</td>
			<td align="center"><input type="submit" value="提 交" />
            <!--<a href="#" onClick="toSubmit();"><img border="0" src="/images/submit.gif" align="absMiddle"></a>-->&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="adminAction.do?method=BoardPer"><img border="0" src="/images/return.gif" align="absMiddle"></a>
			</td>
			<td>&nbsp;</td>
		  </tr>
		  </form>
		</table>
</body>
</html>